<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: PaddingCalculator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">17.10</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1test_1_1_padding_calculator.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">PaddingCalculator Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Calculate required padding.  
 <a href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a0e65ad13124ea2cb5e255b640464e35f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35f">Option</a> { <a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e">EXCLUDE_BORDER</a>, 
<a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35facdccee7243b006a86ce2e3f33795b5be">INCLUDE_BORDER</a>
 }</td></tr>
<tr class="memdesc:a0e65ad13124ea2cb5e255b640464e35f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for computing the padding.  <a href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35f">More...</a><br/></td></tr>
<tr class="separator:a0e65ad13124ea2cb5e255b640464e35f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a309f4b89522e179a81197cb86c6f2147"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a309f4b89522e179a81197cb86c6f2147">PaddingCalculator</a> (int <a class="el" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a>, int processed_elements)</td></tr>
<tr class="memdesc:a309f4b89522e179a81197cb86c6f2147"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct calculator with size of tensor's dimension and step size.  <a href="#a309f4b89522e179a81197cb86c6f2147">More...</a><br/></td></tr>
<tr class="separator:a309f4b89522e179a81197cb86c6f2147"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9926bc2129fe1ad070b6f225873ccfac"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a9926bc2129fe1ad070b6f225873ccfac">set_border_mode</a> (<a class="el" href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327">BorderMode</a> mode)</td></tr>
<tr class="memdesc:a9926bc2129fe1ad070b6f225873ccfac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set border mode.  <a href="#a9926bc2129fe1ad070b6f225873ccfac">More...</a><br/></td></tr>
<tr class="separator:a9926bc2129fe1ad070b6f225873ccfac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacfa81e91a8e77c44b1221606374f8b1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#aacfa81e91a8e77c44b1221606374f8b1">set_border_size</a> (int <a class="el" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a>)</td></tr>
<tr class="memdesc:aacfa81e91a8e77c44b1221606374f8b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set border size.  <a href="#aacfa81e91a8e77c44b1221606374f8b1">More...</a><br/></td></tr>
<tr class="separator:aacfa81e91a8e77c44b1221606374f8b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a17e32f289144bcb2040eaa31d149f0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a8a17e32f289144bcb2040eaa31d149f0">set_access_offset</a> (int <a class="el" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>)</td></tr>
<tr class="memdesc:a8a17e32f289144bcb2040eaa31d149f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set offset of the access relative to the current position.  <a href="#a8a17e32f289144bcb2040eaa31d149f0">More...</a><br/></td></tr>
<tr class="separator:a8a17e32f289144bcb2040eaa31d149f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c357fa4f24f5e2ad4d06b68687d5e9b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a8c357fa4f24f5e2ad4d06b68687d5e9b">set_processed_elements</a> (int elements)</td></tr>
<tr class="memdesc:a8c357fa4f24f5e2ad4d06b68687d5e9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set number of processed elements.  <a href="#a8c357fa4f24f5e2ad4d06b68687d5e9b">More...</a><br/></td></tr>
<tr class="separator:a8c357fa4f24f5e2ad4d06b68687d5e9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4456c6014ddd23c0a45573589a535183"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a4456c6014ddd23c0a45573589a535183">set_accessed_elements</a> (int elements)</td></tr>
<tr class="memdesc:a4456c6014ddd23c0a45573589a535183"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set number of accessed elements.  <a href="#a4456c6014ddd23c0a45573589a535183">More...</a><br/></td></tr>
<tr class="separator:a4456c6014ddd23c0a45573589a535183"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2435ae6ac8638f53c4f315d3f11e84a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">PaddingSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a2435ae6ac8638f53c4f315d3f11e84a7">required_padding</a> () const </td></tr>
<tr class="memdesc:a2435ae6ac8638f53c4f315d3f11e84a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the required padding.  <a href="#a2435ae6ac8638f53c4f315d3f11e84a7">More...</a><br/></td></tr>
<tr class="separator:a2435ae6ac8638f53c4f315d3f11e84a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60c75fe00658b7111117dab64d41467e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">PaddingSize</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a60c75fe00658b7111117dab64d41467e">required_padding</a> (<a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35f">Option</a> option) const </td></tr>
<tr class="memdesc:a60c75fe00658b7111117dab64d41467e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the required padding.  <a href="#a60c75fe00658b7111117dab64d41467e">More...</a><br/></td></tr>
<tr class="separator:a60c75fe00658b7111117dab64d41467e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Calculate required padding. </p>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00036">36</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a0e65ad13124ea2cb5e255b640464e35f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35f">Option</a></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">strong</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Options for computing the padding. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e"></a>EXCLUDE_BORDER</em>&#160;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a0e65ad13124ea2cb5e255b640464e35facdccee7243b006a86ce2e3f33795b5be"></a>INCLUDE_BORDER</em>&#160;</td><td class="fielddoc">
</td></tr>
</table>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00040">40</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        EXCLUDE_BORDER,</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        INCLUDE_BORDER</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;    };</div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a309f4b89522e179a81197cb86c6f2147"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml">PaddingCalculator</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>processed_elements</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct calculator with size of tensor's dimension and step size. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Number of elements available. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">processed_elements</td><td>Number of elements processed per iteration. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00051">51</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        : _size{ <a class="code" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a> }, _num_processed_elements{ processed_elements }, _num_accessed_elements{ processed_elements }</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    {</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    }</div>
<div class="ttc" id="hwc_8hpp_xhtml_ab2c6b258f02add8fdf4cfc7c371dd772"><div class="ttname"><a href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a></div><div class="ttdeci">uint32_t size</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00276">hwc.hpp:276</a></div></div>
</div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a2435ae6ac8638f53c4f315d3f11e84a7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">PaddingSize</a> required_padding </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the required padding. </p>
<p>If access offset is negative and border mode is not undefined, the top, bottom and left padding is set to boder size. Otherwise it is zero. The right padding is always computed based on the specified parameters.</p>
<dl class="section return"><dt>Returns</dt><dd>Required padding in number of elements. </dd></dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00141">141</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>

<p>References <a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e">PaddingCalculator::EXCLUDE_BORDER</a>, and <a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35facdccee7243b006a86ce2e3f33795b5be">PaddingCalculator::INCLUDE_BORDER</a>.</p>
<div class="fragment"><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;{</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a2435ae6ac8638f53c4f315d3f11e84a7">required_padding</a>(_offset &lt; 0 ? <a class="code" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35facdccee7243b006a86ce2e3f33795b5be">Option::INCLUDE_BORDER</a> : <a class="code" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e">Option::EXCLUDE_BORDER</a>);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;}</div>
<div class="ttc" id="classarm__compute_1_1test_1_1_padding_calculator_xhtml_a2435ae6ac8638f53c4f315d3f11e84a7"><div class="ttname"><a href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a2435ae6ac8638f53c4f315d3f11e84a7">arm_compute::test::PaddingCalculator::required_padding</a></div><div class="ttdeci">PaddingSize required_padding() const </div><div class="ttdoc">Compute the required padding. </div><div class="ttdef"><b>Definition:</b> <a href="_padding_calculator_8h_source.xhtml#l00141">PaddingCalculator.h:141</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_padding_calculator_xhtml_a0e65ad13124ea2cb5e255b640464e35facdccee7243b006a86ce2e3f33795b5be"><div class="ttname"><a href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35facdccee7243b006a86ce2e3f33795b5be">arm_compute::test::PaddingCalculator::Option::INCLUDE_BORDER</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_padding_calculator_xhtml_a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e"><div class="ttname"><a href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e">arm_compute::test::PaddingCalculator::Option::EXCLUDE_BORDER</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a60c75fe00658b7111117dab64d41467e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">PaddingSize</a> required_padding </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35f">Option</a>&#160;</td>
          <td class="paramname"><em>option</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute the required padding. </p>
<p>If <code>option</code> is INCLUDE_BORDER and border mode is not undefined, the top, bottom and left padding is set to boder size. Otherwise it is zero. The right padding is always computed based on the specified parameters.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">option</td><td>Padding option</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Required padding in number of elements. </dd></dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00146">146</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>

<p>References <a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e">PaddingCalculator::EXCLUDE_BORDER</a>, <a class="el" href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">arm_compute::test::fixed_point_arithmetic::detail::max()</a>, <a class="el" href="hwc_8hpp_source.xhtml#l00265">padding</a>, <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::U</a>, and <a class="el" href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3">arm_compute::UNDEFINED</a>.</p>
<div class="fragment"><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;{</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <a class="code" href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">PaddingSize</a> <a class="code" href="hwc_8hpp.xhtml#ad487ce76e40f524a7f5e350763b91ae5">padding</a>{ (_mode == <a class="code" href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3">BorderMode::UNDEFINED</a> || option == <a class="code" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e">Option::EXCLUDE_BORDER</a>) ? 0U : static_cast&lt;unsigned int&gt;(<a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(0, _border_size)) };</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;    <span class="keywordtype">int</span> padding_right = 0;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <span class="keywordflow">if</span>(_mode == <a class="code" href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3">BorderMode::UNDEFINED</a>)</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    {</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        padding_right = (((_size - 2 * _border_size + _num_processed_elements - 1) / _num_processed_elements) - 1) * _num_processed_elements + _num_accessed_elements - _size + _border_size + _offset;</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    }</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    {</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        padding_right = (((_size + _num_processed_elements - 1) / _num_processed_elements) - 1) * _num_processed_elements + _num_accessed_elements - _size + _offset;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    }</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="hwc_8hpp.xhtml#ad487ce76e40f524a7f5e350763b91ae5">padding</a>.right = <a class="code" href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">std::max</a>(0, padding_right);</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="hwc_8hpp.xhtml#ad487ce76e40f524a7f5e350763b91ae5">padding</a>;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;}</div>
<div class="ttc" id="namespacearm__compute_xhtml_a4467b302fc9ec312c40580336ab783da"><div class="ttname"><a href="namespacearm__compute.xhtml#a4467b302fc9ec312c40580336ab783da">arm_compute::PaddingSize</a></div><div class="ttdeci">BorderSize PaddingSize</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00206">Types.h:206</a></div></div>
<div class="ttc" id="hwc_8hpp_xhtml_ad487ce76e40f524a7f5e350763b91ae5"><div class="ttname"><a href="hwc_8hpp.xhtml#ad487ce76e40f524a7f5e350763b91ae5">padding</a></div><div class="ttdeci">uint8_t padding[4]</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00265">hwc.hpp:265</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3"><div class="ttname"><a href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327a0db45d2a4141101bdfe48e3314cfbca3">arm_compute::BorderMode::UNDEFINED</a></div><div class="ttdoc">Borders are left undefined. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail_xhtml_ad91bb73431b4de1f4946ed949d444849"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1fixed__point__arithmetic_1_1detail.xhtml#ad91bb73431b4de1f4946ed949d444849">arm_compute::test::fixed_point_arithmetic::detail::max</a></div><div class="ttdeci">fixed_point&lt; T &gt; max(fixed_point&lt; T &gt; x, fixed_point&lt; T &gt; y)</div><div class="ttdef"><b>Definition:</b> <a href="tests_2validation_2_fixed_point_8h_source.xhtml#l00889">FixedPoint.h:889</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_padding_calculator_xhtml_a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e"><div class="ttname"><a href="classarm__compute_1_1test_1_1_padding_calculator.xhtml#a0e65ad13124ea2cb5e255b640464e35fab2b68da4be5fb8de72fb3679df88cf8e">arm_compute::test::PaddingCalculator::Option::EXCLUDE_BORDER</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8a17e32f289144bcb2040eaa31d149f0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_access_offset </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>offset</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set offset of the access relative to the current position. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">offset</td><td>Offset of the access. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00127">127</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>

<p>References <a class="el" href="helpers_8h_source.xhtml#l00295">offset()</a>.</p>
<div class="fragment"><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;{</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    _offset = <a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;}</div>
<div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00295">helpers.h:295</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a4456c6014ddd23c0a45573589a535183"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_accessed_elements </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>elements</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set number of accessed elements. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">elements</td><td>Number of accessed elements per iteration. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00136">136</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;{</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    _num_accessed_elements = elements;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a9926bc2129fe1ad070b6f225873ccfac"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_border_mode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacearm__compute.xhtml#a15a05537a472ee742404821851529327">BorderMode</a>&#160;</td>
          <td class="paramname"><em>mode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set border mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">mode</td><td>Border mode. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00117">117</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>

<p>Referenced by <a class="el" href="_c_l_2_harris_corners_8cpp_source.xhtml#l00057">arm_compute::test::validation::DATA_TEST_CASE()</a>.</p>
<div class="fragment"><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;{</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    _mode = mode;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="aacfa81e91a8e77c44b1221606374f8b1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_border_size </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set border size. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>Border size in elements. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00122">122</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>

<p>References <a class="el" href="hwc_8hpp_source.xhtml#l00276">size</a>.</p>

<p>Referenced by <a class="el" href="_c_l_2_box3x3_8cpp_source.xhtml#l00053">arm_compute::test::validation::DATA_TEST_CASE()</a>.</p>
<div class="fragment"><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;{</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    _border_size = <a class="code" href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a>;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;}</div>
<div class="ttc" id="hwc_8hpp_xhtml_ab2c6b258f02add8fdf4cfc7c371dd772"><div class="ttname"><a href="hwc_8hpp.xhtml#ab2c6b258f02add8fdf4cfc7c371dd772">size</a></div><div class="ttdeci">uint32_t size</div><div class="ttdef"><b>Definition:</b> <a href="hwc_8hpp_source.xhtml#l00276">hwc.hpp:276</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8c357fa4f24f5e2ad4d06b68687d5e9b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void set_processed_elements </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>elements</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set number of processed elements. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">elements</td><td>Number of processed elements per iteration. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_padding_calculator_8h_source.xhtml#l00132">132</a> of file <a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;{</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    _num_processed_elements = elements;</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div>
</div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>tests/<a class="el" href="_padding_calculator_8h_source.xhtml">PaddingCalculator.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1test_1_1_padding_calculator.xhtml">PaddingCalculator</a></li>
    <li class="footer">Generated on Thu Oct 12 2017 14:26:38 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
